#ifndef XGE_XPLUGGER_H_
#define XGE_XPLUGGER_H_
#include "xge_common_config.h"
#include "xstring.h"

namespace xge{
namespace xge_internal{

  // XPlugger means a plug-in module interface 
  // the Install and Unistall function will be called
  // at the plunger start-up time , generally the Install
  // will be called by the XPluggerManager and Uninstall 
  // will be called by other Manager class at their exit time.

  // XPlugger will not inherit the XAllocator
  // since it is not the creator and deleter 
  // You can also inherit the XPlugger interface , and not make it
  // a plug-in , in this case , you should call Install and Unistall
  // by your self or simply omit this two function as you wish .

  class XPlugger {


  public:
    // Install the module  
    // if this module is failed by calling install 
    // an error will register in the system log , of course
    // this module will not register by XPlugManager 
    virtual bool Install ( void* argument ) = 0 ;
    // unistall the module 
    virtual bool Uninstall( void* argument ) = 0 ;
    // name of the plugger
    virtual const XString& plug_name() const = 0;
  };


}
}

#endif // XGE_XPLUGGER_H_